package com.ly.heart.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 采购订单交货安排对象 erp_order_delivery
 *
 * @author cxl
 * @date 2024-06-06
 */
@TableName ("erp_order_delivery")
@ApiModel (value = "采购订单交货安排", description = "采购订单交货安排")
@Data
@Accessors(chain = true)
public class OrderDeliveryEntity {

        /** 主键id */
        @TableId (type = IdType.INPUT)
        private String id;

        /** 采购订单id */
        @ApiModelProperty ("采购订单id")
        @TableField ("order_id")
        @Excel (name = "采购订单id")
        private String orderId;

        /** 采购订单物料明细id */
        @ApiModelProperty ("采购订单物料明细id")
        @TableField ("material_detail_id")
        @Excel (name = "采购订单id")
        private String materialDetailId;

        /** 物料id */
        @ApiModelProperty ("物料id")
        @TableField ("material_id")
        @Excel (name = "物料id")
        private String materialId;

        /** 物料名称 */
        @ApiModelProperty ("物料名称")
        @TableField ("material_name")
        @Excel (name = "物料名称")
        private String materialName;

        /** 辅助属性 */
        @ApiModelProperty ("辅助属性")
        @TableField ("support_attr")
        @Excel (name = "辅助属性")
        private String supportAttr;

        /** bom版本 */
        @ApiModelProperty ("bom版本")
        @TableField ("bom_ver")
        @Excel (name = "bom版本")
        private String bomVer;

        /** 批号 */
        @ApiModelProperty ("批号")
        @TableField ("batch_num")
        @Excel (name = "批号")
        private String batchNum;

        /** 供应商批号 */
        @ApiModelProperty ("供应商批号")
        @TableField ("supplier_batch")
        @Excel (name = "供应商批号")
        private String supplierBatch;

        /** 收料组织 */
        @ApiModelProperty ("收料组织")
        @TableField ("receive_org")
        @Excel (name = "收料组织")
        private String receiveOrg;

        /** 收料部门 */
        @ApiModelProperty ("收料部门")
        @TableField ("receive_dept")
        @Excel (name = "收料部门")
        private String receiveDept;

        /** 需求组织 */
        @ApiModelProperty ("需求组织")
        @TableField ("require_org")
        @Excel (name = "需求组织")
        private String requireOrg;

        /** 需求部门 */
        @ApiModelProperty ("需求部门")
        @TableField ("require_dept")
        @Excel (name = "需求部门")
        private String requireDept;

        /** 控制交货数量 */
        @ApiModelProperty ("控制交货数量")
        @TableField ("control_delivery_num")
        @Excel (name = "控制交货数量")
        private Boolean controlDeliveryNum;

        /** 交货上限 */
        @ApiModelProperty ("交货上限")
        @TableField ("delivery_up")
        @Excel (name = "交货上限")
        private String deliveryUp;

        /** 交货下限 */
        @ApiModelProperty ("交货下限")
        @TableField ("delivery_down")
        @Excel (name = "交货下限")
        private String deliveryDown;

        /** 控制交货时间 */
        @ApiModelProperty ("控制交货时间")
        @TableField ("control_delivery_time")
        @Excel (name = "控制交货时间")
        private Boolean controlDeliveryTime;

        /** 交货提前天数 */
        @ApiModelProperty ("交货提前天数")
        @TableField ("delivery_lead_day")
        @Excel (name = "交货提前天数")
        private String deliveryLeadDay;

        /** 交货延迟天数 */
        @ApiModelProperty ("交货延迟天数")
        @TableField ("delivery_delay_day")
        @Excel (name = "交货延迟天数")
        private String deliveryDelayDay;

        /** 最早交货日期 */
        @ApiModelProperty ("最早交货日期")
        @TableField ("delivery_early_time")
        @JsonFormat (pattern = "yyyy-MM-dd")
        @Excel (name = "最早交货日期", width = 30, dateFormat = "yyyy-MM-dd")
        private Date deliveryEarlyTime;

        /** 最晚交货日期 */
        @ApiModelProperty ("最晚交货日期")
        @TableField ("delivery_latest_time")
        @JsonFormat (pattern = "yyyy-MM-dd")
        @Excel (name = "最晚交货日期", width = 30, dateFormat = "yyyy-MM-dd")
        private Date deliveryLatestTime;

        /** 录入人 */
        @ApiModelProperty ("录入人")
        @TableField ("user_id")
        @Excel (name = "录入人")
        private String userId;

        @ApiModelProperty ("创建时间")
        @JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" )
        @TableField ("create_time")
        private Date createTime;

        /** 更新时间 */
        @ApiModelProperty ("更新时间")
        @TableField ("change_time")
        @JsonFormat (pattern = "yyyy-MM-dd")
        @Excel (name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
        private Date changeTime;

        @ApiModelProperty ("逻辑删除")
        @TableField ("is_used")
        @Excel (name = "逻辑删除")
        private Integer isUsed;

        @ApiModelProperty("交货安排明细信息")
        @TableField(exist = false)
        private List<OrderDeliveryDetailEntity> orderDeliveryDetails;


}
